package Events;

import java.awt.Color;
import java.util.Date;
import java.util.Vector;


public abstract class GenericEvent {
  /* {src_lang=Java}*/


  protected String subject;

  protected Date t_Start;

  protected Date d_Start;

  protected String description;

  protected String icon;

  protected Color color;

  protected Integer type;

  protected Integer idEvent;

	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public Date getT_Start() {
		return t_Start;
	}
	public void setT_Start(Date t_Start) {
		this.t_Start = t_Start;
	}
	public Date getD_Start() {
		return d_Start;
	}
	public void setD_Start(Date d_Start) {
		this.d_Start = d_Start;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public Color getColor() {
		return color;
	}
	public void setColor(Color color) {
		this.color = color;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public Integer getIdEvent() {
		return idEvent;
	}
	public void setIdEvent(Integer idEvent) {
		this.idEvent = idEvent;
	}
    public abstract String toString();
    
    public long getTime_Start()
    {
    	Date d = getD_Start();
    	if(type!=2)
    	{
	    	d.setHours(getT_Start().getHours());
			d.setMinutes(getT_Start().getMinutes());
			d.setSeconds(getT_Start().getSeconds());
    	}
		return d.getTime();
    }
    
    public int getSaveTime()
    {
    	Date d = getD_Start();
		return (d.getMonth()+1)*(d.getYear()+1900);
    }
    

}